{% extends 'admin.twig' %}

{% import '@CorePluginsAdmin/macros.twig' as plugins %}

{% set title %}{{ 'CorePluginsAdmin_PluginsManagement'|translate }}{% endset %}

{% block content %}
<div class="pluginsManagement">

    {% if pluginsHavingUpdate|length %}
        <h2>{{ pluginsHavingUpdate|length }} Update(s) available</h2>

        <p>{{ 'CorePluginsAdmin_InfoPluginUpdateIsRecommended'|translate }}</p>

        {{ plugins.tablePluginUpdates(pluginsHavingUpdate, updateNonce, activateNonce, 0) }}
    {% endif %}

    <h2 piwik-enriched-headline>{{ title }}</h2>

    <p>{{ 'CorePluginsAdmin_PluginsExtendPiwik'|translate }}
        {{ 'CorePluginsAdmin_OncePluginIsInstalledYouMayActivateHere'|translate }}

    {% if not isPluginsAdminEnabled %}
        <br/>{{ 'CorePluginsAdmin_DoMoreContactPiwikAdmins'|translate }}
    {% endif %}

        <br />
        {{ 'CorePluginsAdmin_ChangeLookByManageThemes'|translate('<a href="' ~ linkTo({'action': 'themes'}) ~'">', '</a>')|raw }}
    </p>

    {{ plugins.pluginsFilter(false, isMarketplaceEnabled) }}

    {{ plugins.tablePlugins(pluginsInfo, pluginNamesHavingSettings, activateNonce, deactivateNonce, uninstallNonce, false, marketplacePluginNames, isPluginsAdminEnabled) }}

</div>
{% endblock %}